package com.cxy.datawarehouse.service;

import com.cxy.datawarehouse.entity.StandardCodeLevel;
import com.cxy.datawarehouse.entity.StandardCodeType;
import com.cxy.datawarehouse.mapper.StandardCodeLevelMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Slf4j
@Service
public class StandardCodeLevelService {
    @Resource
    StandardCodeLevelMapper standardCodeLevelMapper;

    public List<StandardCodeLevel> list() {
        return standardCodeLevelMapper.findAll();
    }

    public void create(StandardCodeLevel standardCodeLevel){
        standardCodeLevelMapper.save(standardCodeLevel);
    }

    public void deleteById(Long id){
        standardCodeLevelMapper.deleteById(id);
    }

    public void update(StandardCodeLevel standardCodeLevel){
        standardCodeLevelMapper.save(standardCodeLevel);
    }
}
